#pragma once

typedef bool (*pfnmessage)( HANDLE client, void* data, size_t size );

struct message
{
	USHORT		msgtype;
	pfnmessage	pfn;
};

void ProcessData( HANDLE client, void* data, size_t size );

bool RequestAlgorithm( HANDLE client, void* data, size_t size );
bool RequestData( HANDLE client, void* data, size_t size );
bool ClientResult( HANDLE client, void* data, size_t size );
bool ClientProgress( HANDLE client, void* data, size_t size );
bool ClientError( HANDLE client, void* data, size_t size );
bool ClientQuit( HANDLE client, void* data, size_t size );